<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@page import="model.JsfCoach"%>
<%@taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<%
	JsfCoach coach = (JsfCoach) session.getAttribute("coach");
	int ps = coach.getId();
%>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="css/bootstrap.min.css" rel="stylesheet" media="screen">
<title>我的课程</title>
</head>
<body>
<table>
		<tr>
			<td width="150">编号</td>
			<td width="500">姓名</td>
			<!-- <td width="150">是否通过</td> -->
			<%if( Integer.parseInt(request.getAttribute("level").toString()) == 12 || 
			Integer.parseInt(request.getAttribute("level").toString()) == 10 ){%>
			<td>操作</td>
			<%  }%>
		</tr>
		<s:iterator value="classlist" var="var">
			<tr>
				<td width="150"><a
					href="class_findById?classId=<s:property value="#var.id" />"> <s:property
							value="#var.id" /> </a></td>
				<td width="500"><s:property value="#var.name" /></td>
				<!-- <td width="150"><s:property value="#var.passed" /></td> -->
				<%if( Integer.parseInt(request.getAttribute("level").toString()) == 12 ){%>
				<!-- 1代表有        审批课程      的权限             level=22代表未审核通过的课程 -->
				<td>
				<input type="button" value="删除" class="btn btn-warning"
				onclick="if(confirm('确定删除？'))location.href ='class_delete?classId=<s:property value="#var.id"/>';" />
				<input type="button" value="修改" class="btn btn-success"
				onclick="location.href ='class_findById?classId=<s:property value="#var.id"/>&level=32';" />
				<%  }else if ( Integer.parseInt(request.getAttribute("level").toString()) == 10 ){%>
				<!-- 1代表有        审批课程      的权限             level=22代表未审核通过的课程 -->
				<td>
				<input type="button" value="删除" class="btn btn-warning"
				onclick="if(confirm('确定删除？'))location.href ='class_delete?classId=<s:property value="#var.id"/>';" />
				<input type="button" value="修改" class="btn btn-success"
				onclick="location.href ='class_findById?classId=<s:property value="#var.id"/>&level=32';" />
				<input type="button" value="重新上传" class="btn btn-info"
				onclick="if(confirm('确定重新上传？'))location.href ='class_reupload?classId=<s:property value="#var.id"/>';" />
				<input type="button" value="查看不通过原因" class="btn btn-info"
				onclick="location.href ='class_findById?classId=<s:property value="#var.id"/>&level=34';" />
				<%  }%>
			</tr>
		</s:iterator>
	</table>
</body>
</html>